Skip to content

Conversation

@kjw3
Copy link
Member

@kjw3 kjw3 commented Oct 24, 2025

…ility tests

Major Changes:

  • Replace io/ioutil with io and os packages across 10 files (14 function calls)
    • ioutil.ReadAll -> io.ReadAll
    • ioutil.ReadFile -> os.ReadFile
    • ioutil.WriteFile -> os.WriteFile
    • ioutil.ReadDir -> os.ReadDir
  • Remove duplicate start command registration in pkg/cmd/cmd.go

Workbench Compatibility Enhancements:

  • Add comprehensive documentation to cli_output_compatibility_test.go
  • Add Test_ListWithOrgFlag to verify 'brev ls --org' support
  • Add Test_ShortHelpFlag to verify 'brev -h' works (Workbench uses this)
  • Add Test_VersionWithNoCheckLatestFlag for flag variation testing
  • Add Test_InstanceListColumnHeadersStability for critical column validation
  • Add Test_OrgListColumnHeadersStability for org list format
  • Add Test_CommandExistenceForWorkbench for comprehensive command checks
  • Improve Test_StartCommandFormat to explicitly verify --org flag

All changes verified with successful build and test execution. Tests ensure backward compatibility with NVIDIA AI Workbench integration.

…ility tests

Major Changes:
- Replace io/ioutil with io and os packages across 10 files (14 function calls)
  * ioutil.ReadAll -> io.ReadAll
  * ioutil.ReadFile -> os.ReadFile
  * ioutil.WriteFile -> os.WriteFile
  * ioutil.ReadDir -> os.ReadDir
- Remove duplicate start command registration in pkg/cmd/cmd.go

Workbench Compatibility Enhancements:
- Add comprehensive documentation to cli_output_compatibility_test.go
- Add Test_ListWithOrgFlag to verify 'brev ls --org' support
- Add Test_ShortHelpFlag to verify 'brev -h' works (Workbench uses this)
- Add Test_VersionWithNoCheckLatestFlag for flag variation testing
- Add Test_InstanceListColumnHeadersStability for critical column validation
- Add Test_OrgListColumnHeadersStability for org list format
- Add Test_CommandExistenceForWorkbench for comprehensive command checks
- Improve Test_StartCommandFormat to explicitly verify --org flag

All changes verified with successful build and test execution.
Tests ensure backward compatibility with NVIDIA AI Workbench integration.
@kjw3 kjw3 requested a review from Copilot October 24, 2025 15:05
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR modernizes the codebase by migrating from the deprecated io/ioutil package to the standard io and os packages, removes a duplicate command registration, and adds comprehensive Workbench compatibility tests with detailed documentation.

  • Replaces all io/ioutil function calls with their modern equivalents (io.ReadAll, os.ReadFile, os.WriteFile, os.ReadDir)
  • Removes duplicate start command registration in command tree initialization
  • Adds 7 new integration tests with extensive documentation of NVIDIA AI Workbench dependencies

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pkg/workspacemanagerv2/containermanager_test.go Replace ioutil.ReadDir with os.ReadDir
pkg/store/workspace.go Replace ioutil.ReadAll with io.ReadAll
pkg/store/file.go Replace ioutil.ReadAll with io.ReadAll
pkg/store/authtoken.go Replace ioutil.ReadAll with io.ReadAll
pkg/setupworkspace/setupworkspace.go Replace ioutil.ReadFile and ioutil.WriteFile with os equivalents
pkg/mergeshells/mergeshells.go Replace ioutil.ReadAll and ioutil.ReadDir with modern equivalents
pkg/integration/cli_output_compatibility_test.go Add comprehensive Workbench compatibility tests and documentation
pkg/huproxyclient/huproxyclient.go Replace ioutil.ReadAll with io.ReadAll
pkg/files/files.go Replace ioutil.ReadAll and ioutil.WriteFile with modern equivalents
pkg/cmd/paths/paths.go Replace ioutil.ReadDir with os.ReadDir
pkg/cmd/importideconfig/importideconfig.go Replace ioutil.ReadDir with os.ReadDir
pkg/cmd/cmd.go Remove duplicate start.NewCmdStart command registration
pkg/cmd/clipboard/clipboard_listener.go Replace ioutil.ReadAll with io.ReadAll

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

kjw3 and others added 3 commits October 24, 2025 11:06
Add nolint:gosec comment for G204 warning in Test_CommandExistenceForWorkbench.
The flagged code uses hardcoded test values in cmd.args, not user input,
so the security warning is a false positive.
Remove trailing whitespace and fix indentation to comply with gofmt standards.
@kjw3 kjw3 requested a review from Copilot October 24, 2025 15:18
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated no new comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants